//////////////////////////////////////////////////////////////////////////////
//       Copyright (c) 2003 - RealTime Gaming.  All rights reserved.        //
//////////////////////////////////////////////////////////////////////////////

#ifndef ECONFIRM_H
#define ECONFIRM_H

#include "lib.h"
#include "tracksql.h"
#include "email.h"
#include "smtp.h"

class EmailConfirmation : public Email
{
	public:
		enum EmailId	// correspond to SQL emailIds
		{
			WELCOME							= 0,
            LOST_PASSWORD                   = 20,
			LISTSERV_SUBSCRIBE				= 29,
			COUPON_REDEEMED					= 30,
			PLAYER_AFFILIATE				= 35,
			COUPON_DENIED					= 56,
			COUPON_EXPIRED					= 57,
			WITHDRAWAL_REVERSED				= 31,
			VANITY_COUPON_REDEEMED			= 53,
			VANITY_COUPON_DENIED			= 54
		};

        EmailConfirmation( Library::KeywordSubstitutor* pSubstitutor, TrackSQL* sql );

		bool8 send(int32 casinoId, int32 skinId, const PID& pid, int32 emailId);
		bool8 sendToReferral(int32 casinoId, int32 skinId, const PID& pid,	const String& sEmailTo);
		bool8 enrollListserv(int32 casinoId, int32 skinId, const PID& pid );

	protected:
		String getEmailMsg(int32 casinoId, int32 skinId, const PID& pid, int32 emailId, SMTP::Header* hdr);
};

#endif